import Cookies from 'Cookies';

export default {
  install(Vue) {
    Vue.mixin({
      data() {
        return {
          Cookies,
        };
      },
      methods: {
        // 给子应用发送消息
        sendMsg2content(payload, orgin) {
          const { meta } = this.$route;
          const content = window.frames['content'];
          content.postMessage(payload, orgin || meta.orgin);
        },
      },
    });
  },
};
